using Assets.Script;
using UnityEngine;
using UnityEngine.EventSystems;

public class GameRoot : MonoBehaviour
{
    public static GameRoot instance;
    // Start is called before the first frame update
    void Start()
    {

        if (instance == null)
        {
            ConFigManager.Ins.LoadJson();
            UIManager.Ins.OpenUI(UIName.MainPanel);
            DontDestroyOnLoad(this);
            instance = this;
            GameObject.Instantiate(Resources.Load<GameObject>("UI/Prefab/EventSystem"),GameObject.Find("UIRoot").transform);
        }
        else
        {
            Destroy(this.gameObject);
        }
        
    }
}
